/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package it.txt.access.capability.spi.resource.visual;

import it.txt.access.capability.spi.resource.model.ICapabilityResourceIDModel;

/**
 *
 * @author seccia
 */
public abstract class ICapabilityResourceIDDialog extends javax.swing.JDialog{

    /** A return status code - returned if Cancel button has been pressed */
    public static final int RET_CANCEL = 0;
    /** A return status code - returned if OK button has been pressed */
    public static final int RET_OK = 1;
    //the returned value
    private int returnStatus = RET_CANCEL;
    
    public ICapabilityResourceIDDialog(java.awt.Frame parent, boolean modal){
        super(parent, modal);
    }

    /** @return the return status of this dialog - one of RET_OK or RET_CANCEL */
    public int getReturnStatus() {
        return returnStatus;
    }

    protected void doClose(int retStatus) {
        returnStatus = retStatus;
        setVisible(false);
        dispose();
    }

    public abstract ICapabilityResourceIDModel getModel();
}
